﻿using System;
using System.Collections.Generic;
using System.Linq;
using BlackBird.Models;


namespace BlackBird.DataAccess
{
    public static class DBUtils
    {
        public static Contactor ConvertDBToDM(contactor contractorDB)
        {
            return new Contactor()
            {
                RealName = contractorDB.RealName,
                Address = contractorDB.Address,
                Zipcode = contractorDB.Zipcode,
                Email = contractorDB.Email,
                Tel = contractorDB.Tel,
                Phone = contractorDB.Phone
            };         
        }

        public static contactor ConvertDMToDB(Contactor contactorDm)
        {
            return new contactor()
            {
                RealName = contactorDm.RealName,
                Address = contactorDm.Address,
                Zipcode = contactorDm.Zipcode,
                Email = contactorDm.Email,
                Tel = contactorDm.Tel,
                Phone = contactorDm.Phone
            };
        }
    }

}